﻿@using STX.Domain
@using STX.Lib.Utils
@{
    Layout = null;
    STX.Domain.TabAdministrator CurUser = ViewBag.CurUser;
    var chkUpladScriptRight = STXConfig.GetValue("/config/security/checkUploadScriptRight").ToLower();
}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html style="width:100%; height:100%; overflow:hidden">
    <head>
        <title>@ViewBag.Title</title>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0" />
        <link rel="stylesheet" href="@Url.Content("~/administrator/content/strongdigital/css/style.css")" />
        <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,800' rel='stylesheet' type='text/css'>
        <link href="@Url.Content("~/Component/uploadify/css/uploadify.css")" rel="stylesheet" type="text/css" media="screen"/>
        <script src="@Url.Content("~/administrator/content/strongdigital/js/jquery-1.7.2.min.js")" type="text/javascript"></script>

        <script src="@Url.Content("~/Component/xheditor/xheditor-1.2.1.min.js")" type="text/javascript"></script>
        <script src="@Url.Content("~/Component/uploadify/scripts/jquery.uploadify.js")" type="text/javascript"></script>

        <script src="@Url.Content("~/administrator/content/strongdigital/js/dialogManager.js")" type="text/javascript"></script>
        <script src="@Url.Content("~/administrator/content/strongdigital/js/alertManager.js")" type="text/javascript"></script>
        <script src="@Url.Content("~/administrator/content/strongdigital/js/ajaxManager.js")" type="text/javascript"></script>
        <script src="@Url.Content("~/administrator/content/strongdigital/js/core.js")" type="text/javascript"></script>
        <script src="@Url.Content("~/administrator/content/strongdigital/js/verticalSplitContainer.js")" type="text/javascript"></script>
        <script src="@Url.Content("~/administrator/content/strongdigital/js/horizontalSplitContainer.js")" type="text/javascript"></script>
        <script src="@Url.Content("~/administrator/content/strongdigital/js/ratioView.js")" type="text/javascript"></script>
        <script src="@Url.Content("~/administrator/content/strongdigital/js/accordion.js")" type="text/javascript"></script>
        <script src="@Url.Content("~/administrator/content/strongdigital/js/dwz.tree.js")" type="text/javascript"></script>
        <script src="@Url.Content("~/administrator/content/strongdigital/js/dwz.tab.js")" type="text/javascript"></script>
        <script src="@Url.Content("~/administrator/content/strongdigital/js/dwz.datepicker.js")" type="text/javascript"></script>
        <script src="@Url.Content("~/administrator/content/strongdigital/js/dwz.util.date.js")" type="text/javascript"></script>
        <script src="@Url.Content("~/administrator/content/strongdigital/js/remotePanel.js")" type="text/javascript"></script>
        <script src="@Url.Content("~/administrator/content/strongdigital/js/tabPanelContainer.js")" type="text/javascript"></script>
        <script src="@Url.Content("~/administrator/content/strongdigital/js/application.js")" type="text/javascript"></script>
        <script src="@Url.Content("~/administrator/content/strongdigital/js/link.js")" type="text/javascript"></script>
        <script src="@Url.Content("~/administrator/content/strongdigital/js/dragable.js")" type="text/javascript"></script>
        <script src="@Url.Content("~/administrator/content/strongdigital/js/resizeable.js")" type="text/javascript"></script>
        <script src="@Url.Content("~/administrator/content/strongdigital/js/listpage.js")" type="text/javascript"></script>
        <script src="@Url.Content("~/administrator/content/strongdigital/js/addpage.js")" type="text/javascript"></script>
        <script src="@Url.Content("~/administrator/content/strongdigital/js/selectAllToggle.js")" type="text/javascript"></script>
        <script src="@Url.Content("~/administrator/content/strongdigital/js/storechooser.js")" type="text/javascript"></script>
        <script src="@Url.Content("~/administrator/content/strongdigital/js/reportsubmit.js")" type="text/javascript"></script>
        <script src="@Url.Content("~/Scripts/json2.js")" type="text/javascript"></script>
        <link href="@Url.Content("~/Component/UEditor/themes/default/css/umeditor.css")" type="text/css" rel="stylesheet">
        <script type="text/javascript" src="@Url.Content("~/Component/ueditor/ueditor.config.js")"></script>
        <script type="text/javascript" src="@Url.Content("~/Component/ueditor/ueditor.all.min.js")"></script>

        <script>
            var r20 = /%20/g,
                rbracket = /\[\]$/,
                rCRLF = /\r?\n/g,
                rsubmitterTypes = /^(?:submit|button|image|reset|file)$/i,
                rsubmittable = /^(?:input|select|textarea|keygen)/i;
            //Serialize an array of form elements or a set of
            //key/values into a query string
            jQuery.param = function (a, traditional) {
                var prefix,
                    s = [],
                    add = function (key, value) {
                        // If value is a function, invoke it and return its value
                        value = jQuery.isFunction(value) ? value() : (value == null ? "" : value);
                        s[s.length] = encodeURIComponent(key) + "=" + encodeURIComponent(value);
                    };

                // Set traditional to true for jQuery <= 1.3.2 behavior.
                if (traditional === undefined) {
                    traditional = jQuery.ajaxSettings && jQuery.ajaxSettings.traditional;
                }

                // If an array was passed in, assume that it is an array of form elements.
                if (jQuery.isArray(a) || (a.jquery && !jQuery.isPlainObject(a))) {
                    // Serialize the form elements
                    jQuery.each(a, function () {
                        add(this.name, this.value);
                    });

                } else {
                    // If traditional, encode the "old" way (the way 1.3.2 or older
                    // did it), otherwise encode params recursively.
                    for (prefix in a) {
                        buildParams(prefix, a[prefix], traditional, add);
                    }
                }

                // Return the resulting serialization
                return s.join("&").replace(r20, "+");
            };
            function buildParams(prefix, obj, traditional, add) {
                var name;

                if (jQuery.isArray(obj)) {
                    // Serialize array item.
                    jQuery.each(obj, function (i, v) {
                        if (traditional || rbracket.test(prefix)) {
                            // Treat each array item as a scalar.
                            add(prefix, v);

                        } else {
                            // Item is non-scalar (array or object), encode its numeric index.
                            //buildParams(prefix + "[" + (typeof v === "object" ? i : "") + "]", v, traditional, add);
                            buildParams(prefix + "[" + i + "]", v, traditional, add);
                        }
                    });

                } else if (!traditional && jQuery.type(obj) === "object") {
                    // Serialize object item.
                    for (name in obj) {
                        buildParams(prefix + "[" + name + "]", obj[name], traditional, add);
                    }

                } else {
                    // Serialize scalar item.
                    add(prefix, obj);
                }
            }
            $(function () {
                $("#warp").verticalSplitContainer();
                $("#main").horizontalSplitContainer();
                $("#left").verticalSplitContainer();
                $("#menu").accordion({expandItem:1});
                $(window).resize(function () {
                    App.layout();
                });
                $(".tree").jTree();
                $("#right").tabPanelContainer({ application: App });
                $("a[target='navtab']").link({ application: App });
                window.homeid= App.getTabPanelContainer().addTab({url:"@Url.Action("Welcome")",name:"首页",closeable:false});
            });

            function gotohome(){
                App.getTabPanelContainer().selectTab(homeid);
            }

        </script>
        <style type="text/css">
            html{width:100%;height:100%; margin:0;  padding:0; }
            body{width:100%;height:100%; margin:0;  padding:0; }
            #warp{width:100%;height:100%;}
            #top{width:100%; background:#1f262d; position:relative;}
            #bottom{width:100%;}
            #bottom p{ height:38px; line-height:38px;  text-align:center; font-family: Open Sans; color:#666;padding-left:200px;}
            #left{height:100%;float:left;}
            #menu{width:100%;}
            #spilter{height:100%;float:left; cursor:pointer;}
            #right{height:100%;float:left;}
            #welcome{ position:absolute; right:100px; top:16px; color:#ccc; font-weight:normal;}
            #welcome a{ color:#ccc;}
            .logo{ position:absolute; top:20px; left:15px; z-index:10;}
        </style>
    </head>
    <body scroll="no">
        <div class="logo"><img src="@Url.Content("~/administrator/content/classic/images/logo.jpg")"></div>
        <div id="warp">
            <div id="top" ratio="#38">
                <div id="welcome">
                    欢迎你：@CurUser.Name &nbsp;&nbsp;&nbsp;&nbsp;职位：@CurUser.Position.GetFiledName() &nbsp;&nbsp;&nbsp;&nbsp;<a href="@Url.Action("index", "logout")">退出</a>
                </div>
            </div>
            <div id="main" ratio="*">
                <div id="left" ratio="#200">
                    <div id="blackarea" ratio="#38" style=" background:#1F262D;"></div>
                    <div id="menu" class="accordion" ratio="*">
                        
                            <div>         
                                <div class="header glowline1">
                                    <div class="collapsable standardheight"><span class="icon folder fl"></span><span class="standardheight fl">系统管理</span></div>
                                </div>
                                <div class="content">
                                    <ul class="tree treeFolder">
                                        @if (CurUser.Position == PositionEnum.SystemPower
                                            || CurUser.Position == PositionEnum.GeneralManager)
                                        {
                                        <li><a href="@Url.Action("index", "tabblacklist")" target="navtab">黑名单</a></li>
                                        <li><a href="@Url.Action("index", "tabcategory")" target="navtab">分类管理</a></li>
                                        <!--<li><a href="@Url.Action("index", "tabrolegroup")" target="navtab">权限组</a></li>
                                            <li><a href="@Url.Action("index", "tabrole")" target="navtab">权限</a></li>
                                            <li><a href="@Url.Action("index", "tabusergroup")" target="navtab">后台用户组</a></li>
                                            -->
                                            <li><a href="@Url.Action("index", "tabadministrator")" target="navtab">后台用户</a></li>
                                            
                                        }
                                        <li><a href="@Url.Action("resetpwd", "tabadministrator")" target="navtab">修改密码</a></li>
                                        <li><a href="@Url.Action("index", "logout")"  target="_self">退出</a></li>
                                    </ul>
                                </div>
                            </div>
                        
                        <div>         
                            <div class="header glowline1">
                                <div class="collapsable standardheight"><span class="icon folder fl"></span><span class="standardheight fl">业务管理</span></div>
                            </div>
                            <div class="content">
                                <ul class="tree treeFolder">
                                    @if (CurUser.Position == PositionEnum.SystemPower
                                         || CurUser.Position == PositionEnum.GeneralManager)
                                    {
                                        <li><a href="@Url.Action("index", "bizarea")" target="navtab">地方管理</a></li>
                                        <li><a href="@Url.Action("index", "bizmaterialcategory")" target="navtab">物料分类管理</a></li>
                                        <li><a href="@Url.Action("index", "bizsupplier")" target="navtab">供应商管理</a></li>
                                        <li><a href="@Url.Action("index", "bizquotepricetemplate")" target="navtab">报价模板管理</a></li>
                                        <li><a href="@Url.Action("index", "bizproject")" target="navtab">项目管理</a></li>
                                    }
                                    <li><a href="@Url.Action("index", "bizactivity")" target="navtab">活动管理</a></li>
                                </ul>
                            </div>
                        </div>
                        @if (CurUser.Position == PositionEnum.SystemPower
                                         || CurUser.Position == PositionEnum.FinancialManager
                                         || CurUser.Position == PositionEnum.CFO)
                        {
                        <div>         
                            <div class="header glowline1">
                                <div class="collapsable standardheight"><span class="icon folder fl"></span><span class="standardheight fl">财务管理</span></div>
                            </div>
                            <div class="content">
                                <ul class="tree treeFolder">
                                    <li><a href="@Url.Action("index", "bizfinancial")" target="navtab">月活动明细台账</a></li>
                                    <li><a href="@Url.Action("index", "bizexpense")" target="navtab">报销明细表</a></li>
                                </ul>
                            </div>
                        </div>
                        }
                        <div>         
                            <div class="header glowline1">
                                <div class="collapsable standardheight"><span class="icon folder fl"></span><span class="standardheight fl">其他管理</span></div>
                            </div>
                            <div class="content">
                                <ul class="tree treeFolder">
                                    <li><a href="@Url.Action("index", "biznotice")" target="navtab">公告</a></li>
                                    <li><a href="@Url.Action("index", "bizmessage")" target="navtab">通知</a></li>
                                    <li><a href="@Url.Action("index", "bizdownload")" target="navtab">资源共享</a></li>
                                    <li><a href="@Url.Action("index", "bizapply")" target="navtab">在线申请</a></li>
                                </ul>
                            </div>
                        </div>
                                          
                    </div>
                </div>
                <div id="right" class="bordercontainer" ratio="*">
                    <div class="header"></div>
                    <div class="content"></div>
                </div>
            </div>
            <div id="bottom" ratio="#38">
                <p>2013 © StrongDigital Admin. Brought to you by Chichuang.com</p>
            </div>
        </div>
    </body>
</html>
@if (chkUpladScriptRight == "true")
{
<script type="text/javascript">
    $(function () {
        $.get("/upload/test.aspx", function (data) {
            if (data == "2") {
                alert("重要安全提示：upload文件夹有<脚本执行权限>");
            }
        });
    });
</script>
}